home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / slipsrc.zip / SLIP8250.NOT < prev   
Internet Message Format  |  1991-01-30  |  5KB

  1. From hedrick@cs.rutgers.edu Wed Jan 30 12:58:42 1991
  2. Return-Path: <@clutx.clarkson.edu:hedrick@cs.rutgers.edu>
  3. Date: Tue, 29 Jan 91 03:28:51 EST
  4. From: hedrick@cs.rutgers.edu
  5. To: nelson@clutx.clarkson.edu
  6. Subject: SLIP problem
  7. In-Reply-To: USENET article <NELSON.91Jan21132425@sun.clarkson.edu>
  8.  
  9. For what it's worth, the following patches seem to fix my problem.  I
  10. don't propose this as something that I'd actually want to give out to
  11. people, but it may give you an idea of what is going on.  I don't
  12. think the hardware is simply dropping the interrupt, because then KA9Q
  13. would fail also.  So I think it's a problem in SLIP8250, but I sure
  14. can't tell where.
  15.  
  16. *** slip8250.org    Mon Jan 28 22:09:36 1980
  17. --- slip8250.asm    Tue Jan 29 01:15:10 1980
  18. ***************
  19. *** 2,7
  20.   
  21.       include    defs.asm
  22.   
  23.   ;Ported from Phil Karn's asy.c and slip.c, a C-language driver for the IBM-PC
  24.   ;8250 by Russell Nelson.  Any bugs are due to Russell Nelson.
  25.   ;16550 support ruthlessly stolen from Phil Karn's 8250.c. Bugs by Denis DeLaRoca
  26.  
  27. --- 2,9 -----
  28.   
  29.       include    defs.asm
  30.   
  31. + debug = 1
  32.   ;Ported from Phil Karn's asy.c and slip.c, a C-language driver for the IBM-PC
  33.   ;8250 by Russell Nelson.  Any bugs are due to Russell Nelson.
  34.   ;16550 support ruthlessly stolen from Phil Karn's 8250.c. Bugs by Denis DeLaRoca
  35. ***************
  36. *** 151,157
  37.   recv_pkt_ready    dw    0        ; flag indicating a packet is ready
  38.   
  39.     ifdef debug
  40. !     public send_buf
  41.     endif
  42.   send_buf_size    dw    3000,0        ;send buffer size
  43.   send_buf    dw    ?        ;->send buffer
  44.  
  45. --- 153,159 -----
  46.   recv_pkt_ready    dw    0        ; flag indicating a packet is ready
  47.   
  48.     ifdef debug
  49. !     public send_buf, send_buf_end, send_buf_head, send_buf_tail
  50.     endif
  51.   send_buf_size    dw    3000,0        ;send buffer size
  52.   send_buf    dw    ?        ;->send buffer
  53. ***************
  54. *** 160,166
  55.   send_buf_tail    dw    ?        ;->next character to store
  56.   
  57.     ifdef debug
  58. !     public packet_sem, pkt_send_sem, xmit_time
  59.     endif
  60.   packet_sem    dw    0        ; semaphore for    packets received
  61.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  62.  
  63. --- 162,168 -----
  64.   send_buf_tail    dw    ?        ;->next character to store
  65.   
  66.     ifdef debug
  67. !     public packet_sem, pkt_send_sem, xmit_time, send_keep, keep_failed
  68.     endif
  69.   packet_sem    dw    0        ; semaphore for    packets received
  70.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  71. ***************
  72. *** 166,171
  73.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  74.   asyrxint_cnt    dw    0        ; loop counter in asyrxint
  75.   xmit_time    dw    0        ; loop timer for asyrxint
  76.   
  77.       public    rcv_modes
  78.   rcv_modes    dw    4        ;number    of receive modes in our table.
  79.  
  80. --- 168,175 -----
  81.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  82.   asyrxint_cnt    dw    0        ; loop counter in asyrxint
  83.   xmit_time    dw    0        ; loop timer for asyrxint
  84. + send_keep    dw    0        ; keepalive counter for send
  85. + keep_failed    dw    0        ; number of keepalive failures
  86.   
  87.       public    rcv_modes
  88.   rcv_modes    dw    4        ;number    of receive modes in our table.
  89. ***************
  90. *** 240,245
  91.       loop    send_pkt_1
  92.       mov    al,FR_END        ;terminate it with a FR_END
  93.       call    send_char
  94.       mov    send_buf_tail,di
  95.   
  96.       inc    pkt_send_sem        ; increment the semaphore
  97.  
  98. --- 244,252 -----
  99.       loop    send_pkt_1
  100.       mov    al,FR_END        ;terminate it with a FR_END
  101.       call    send_char
  102. +     cli
  103.       mov    send_buf_tail,di
  104.   
  105.       inc    send_keep        ; keepalive count
  106. ***************
  107. *** 242,247
  108.       call    send_char
  109.       mov    send_buf_tail,di
  110.   
  111.       inc    pkt_send_sem        ; increment the semaphore
  112.       cmp    pkt_send_sem, 1        ; see if we need to enable
  113.                       ; xmit buffer empty interrupt
  114.  
  115. --- 249,263 -----
  116.   
  117.       mov    send_buf_tail,di
  118.   
  119. +     inc    send_keep        ; keepalive count
  120. +     cmp    send_keep, 3        ; 3 packets without one xmt done
  121. +     jna    keep_ok
  122. + ; we seem to be hung, probably due to a dropped tx done int.  restart
  123. +     mov    pkt_send_sem, 0        ; indicate we're finished    
  124. +     inc    keep_failed        ; count errors
  125. + keep_ok:
  126.       inc    pkt_send_sem        ; increment the semaphore
  127.       cmp    pkt_send_sem, 1        ; see if we need to enable
  128.                       ; xmit buffer empty interrupt
  129. ***************
  130. *** 265,271
  131.       loadport
  132.       setport    IER
  133.       call    setbit            ; enable
  134. !     cli
  135.   send_pkt_end:
  136.       clc
  137.       ret
  138.  
  139. --- 281,292 -----
  140.       loadport
  141.       setport    IER
  142.       call    setbit            ; enable
  143. !     push ds
  144. !     push cs
  145. !     pop ds
  146. !     call    asytxint
  147. !     pop ds
  148.   send_pkt_end:
  149.       clc
  150.       ret
  151. ***************
  152. *** 668,673
  153.   ;
  154.   
  155.   asytxint:
  156.   
  157.   asytxint_2:
  158.   
  159.  
  160. --- 689,695 -----
  161.   ;
  162.   
  163.   asytxint:
  164. +     mov    send_keep, 0        ; restart keepalive
  165.   
  166.   asytxint_2:
  167.   
  168.  
  169.  
  170.